/**
 * Created by hps on 17-4-27.
 */
public class ObjectSortApp {
    public static void main(String[] args) {
        int maxSize = 100;
        ArrayInObj arr = new ArrayInObj(maxSize);

        arr.insert(new Person("Ecans", "Patty", 24));
        arr.insert(new Person("Smith","Lorraine", 37));
        arr.insert(new Person("Yee","Tom", 43));
        arr.insert(new Person("Adams","Henry", 63));
        arr.insert(new Person("Hashimoto","Sato", 21));
        arr.insert(new Person("Stimson","Henry", 29));
        arr.insert(new Person("Velasquez","Jose", 72));
        arr.insert(new Person("Lamarque","Henry", 54));
        arr.insert(new Person("Vang","Minh", 22));
        arr.insert(new Person("Creswell","Lucinda", 18));

        System.out.println("Before sorting");
        arr.display();

        arr.insertionSort();

        System.out.println("After sorting");
        arr.display();
    }
}
